import request from '@/utils/request'

// 定义响应类型
interface ApiResponse<T> {
  code: number
  data: T
  message: string
}

// 用户相关API
export const userApi = {
  login: (params: { appId: string; token: string }) => {
    return request.get<ApiResponse<{ appId: string; token: string}>>('http://117.73.18.229:9527/hrm/api/attendance/unit/position/7e6b9350ec724f5687b89e5e48d20b21',{ params } )
  },
  getUserInfo: () => {
    return request.get<ApiResponse<{ name: string; avatar: string }>>('/user/info')
  }
}

// 商品相关API
// export const productApi = {
//   releaseDevice: (params: { page: number; size: number }) => {
//     return request.get<ApiResponse<Array<{ appleTeamId: number; name: string }>>>('/htime/app/login/releaseDevice?appleTeamId=YHHD259X5T&deviceID=0AC020E1-6DDA-4623-A458-F52852E04613&isPhone=1&orgId=05f55be45ce541f4850ee2f4b36c7d60&token=d63170e9-94c3-4115-a19a-555fcf01ae65&userId=6b3ec7e9b3f446a48dd7783a84ab8fa8', { params })
//   }
// }